package com.dzgs.zw.bean;

import com.jfinal.plugin.activerecord.Db;

public class ZzVersion {

	public static Integer getMaxVs(String lb){
		String sql = "select max(vs) from zz_version where lb=?";
		return Db.queryInt(sql,lb);
	}
	
	public static String getAppPath(String lb,int vs){
		String sql = "select path from zz_version where lb=? and vs=?";
		return Db.queryStr(sql,lb,vs);
	}
	
	public static Integer delApp(String lb,int vs){
		String sql = "delete zz_version where lb=? and vs=?";
		return Db.update(sql,lb,vs);
	}
	
	public static int saveApp(String lb,int vs,String path){
		String sql = "insert into zz_version (lb,vs,path,djsj) values (?,?,?,getdate())";
		return Db.update(sql,lb,vs,path);
	}
}
